<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/common/taglibs.jsp"%>
<%--@elvariable id="parking" type="com.youtills.core.app.pcc.ParkingSpace"--%>
<%--@elvariable id="handler" type="com.youtills.core.app.pcc.PccEvRequestHandler"--%>
<td  class="parking ${parking.status}">
    <div>
        <c:if test="${!empty parking.carName}">
            ${parking.carName} -
        </c:if>
        ${parking.status}
        (<fmt:formatDate value="${parking.modifiedAt}" pattern="dd/MM/yyyy HH:mm" timeZone="PST"/>)

    </div>
    <c:if test="${parking.ci && handler.evUser.parkingSpace == null}">
        <div><a class="ci" href="pcc-ev?a=ci&p=${parking.name}">Check-in</a></div>
    </c:if>
    <c:if test="${parking.pi && (!parking.ci || handler.evUser.parkingSpace == null)}">
        <div><a  class="pi"  href="pcc-ev?a=pi&p=${parking.name}">Plug-in</a></div>
    </c:if>
    <c:if test="${parking.cc}">
        <div><a  class="cc" href="pcc-ev?a=cc&p=${parking.name}">Charge Complete</a></div>
    </c:if>
    <c:if test="${parking.co && (parking.userId == handler.evUser.id || handler.evUser.admin)}">
        <div><a  class="co" href="pcc-ev?a=co&p=${parking.name}">Check-out</a></div>
    </c:if>
</td>
